/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package areaCircle;

import formula.FormulaProblemParams;
import formula.node.OperationNode;
import formula.node.OperationNodeType;
import formula.node.ValueNode;
import geneticprogramming.problem.GEProblemParams;

/**
 *
 * @author CJ
 */
public class CircleAreaParams {

    protected static final double MAX_VALUE = 10;
    protected static final double MIN_VALUE = 0.1;
    protected static final int MAX_DEPTH = 8;
    protected static final int MAX_FITNESS = 250;

    protected static final int MAX_GENERATION = 30;
    protected static final int DISPLAY_FREQ = -1;
    protected static final int POPULATION = 1000;
    protected static final int MAX_REMATES = 1;

    private CircleAreaParams(){
        

    }

    public static FormulaProblemParams getFormulaParams(){
        FormulaProblemParams params = new FormulaProblemParams();
        params.maxValue = MAX_VALUE;
        params.minValue = MIN_VALUE;
        params.maxDepth = MAX_DEPTH;
        params.maxFitness = MAX_FITNESS;

        //params.constantsStorage.put("pi", 3.1415926535);
        params.varableNames.add("radius");

        params.rootNodeIdeal = new OperationNode(
                new OperationNode(
                new ValueNode(params.ERROR, "radius", 2), new ValueNode(params.ERROR, "radius", 2),
                OperationNodeType.MULTI, 1), new ValueNode(3.1415926535, "pi",  1), OperationNodeType.MULTI, 0);

        params.pack();
        return params;
    }

    public static GEProblemParams getGEParams(){
        return new GEProblemParams(MAX_GENERATION, POPULATION, DISPLAY_FREQ, MAX_REMATES);
    }
    

}
